package com.softeem.exp;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;

public class ExceptionDemo {

	public static void main(String[] args) throws FileNotFoundException {
		
		
		try {
			int i = 10;
			int j = 0;
			int k = i / j;
			new PrintStream(new File(""));
		}catch(NullPointerException e){
			
		} catch(ArithmeticException e){
			
		} catch(ArrayIndexOutOfBoundsException e){
			
		} catch(FileNotFoundException e){
			
		}catch (Exception e) {
			PrintStream ps = new PrintStream(new File("log.txt"));
			e.printStackTrace(ps);
			ps.close();
		}
		
		
	}

}
